home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 20
/
Cream of the Crop 20 (Terry Blount) (1996).iso
/
program
/
n_b_v203.zip
/
MID$.DMO
< prev
next >
Wrap
Text File
|
1996-07-04
|
2KB
|
52 lines
$if 0
┌──────────────────────────╖ PowerBASIC v3.20
┌──┤ DASoft ╟──────────────────────┬──────────────────╖
│ ├──────────────────────────╢ Copyright 1995 │ DATE: 1995-10-01 ╟─╖
│ │ FILE NAME MID$ .DMO ║ by ╘════════════════─ ║ ║
│ │ ║ Don Schullian, Jr. ║ ║
│ ╘══════════════════════════╝ ║ ║
│ A license is hereby granted to the holder to use this source code in ║ ║
│ any program, commercial or otherwise, without receiving the express ║ ║
│ permission of the copyright holder and without paying any royalties, ║ ║
│ as long as this code is not distributed in any compilable format. ║ ║
│ IE: source code files, PowerBASIC Unit files, and printed listings ║ ║
╘═╤═════════════════════════════════════════════════════════════════════╝ ║
│ .................................... ║
╘═══════════════════════════════════════════════════════════════════════╝
$endif
$INCLUDE "DAS-NB01.INC"
COLOR 7,0
CLS
? "┌───────────────────────────────────────────────────────────
? "│ fMID$ ( V$, Start%, Finish% )
? "├──────────────────────────────────────────────────────────────
? "│ Unlike PowerBASIC's MID$ this function works on a from/to
? "│ concept instead of from/for
? "│ Instead of MID$( V$, Start%, Finish%-Start%+1 )
? "│ you use fMID$( V$, Start%, Finish% )
? "│ and save a little typing!
? "│ NOTE: press F9 a few times
? "└─────────────────────────────────────────────────────────────────────
V$ = "This is a test."
Start% = 11 : Finish% = 14
PRINT V$
PRINT
MTIMER
D$ = fMID$( V$, Start%, Finish% )
DASoft = MTIMER
PRINT D$
PRINT USING "ELAPSED TIME: DASoft =###m/sec"; DASoft
PRINT
MTIMER
P$ = MID$( V$, Start%, ( Finish% - Start% + 1 ) )
PBasic = MTIMER
PRINT P$
PRINT USING "ELAPSED TIME: PBasic =###m/sec"; PBasic